﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PWMIS.DataMap.Entity;
using FTchina.Models;
using Oracle.DataAccess.Client;

public partial class test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        PWMIS.DataProvider.Data.AdoHelper ado = PWMIS.DataProvider.Adapter.MyDB.GetDBHelperByConnectionName("DYDB");
        FTchina.Models.OraTestModel otm = new FTchina.Models.OraTestModel();
        otm.GUID = "1";
        otm.NUM = "999";
        otm.USER_ID = Guid.NewGuid().ToString();
        
        EntityQuery<OraTestModel> query = new EntityQuery<OraTestModel>(ado);
        query.Insert(otm);


//        string SQL = @"UPDATE TMP1 SET NUM=:P1,USER_ID=:P2 WHERE GUID=:P0";
//        OracleParameter[] parameters = {
//new OracleParameter(":P1", OracleDbType.Varchar2),
//new OracleParameter(":P2", OracleDbType.Varchar2),
//new OracleParameter(":P0", OracleDbType.Varchar2)};
//        parameters[0].Value = "999";
//        parameters[1].Value = "8888";
//        parameters[2].Value = "1";
//        Response.Write("<br>"+ado.ExecuteNonQuery(SQL, System.Data.CommandType.Text, parameters));

    }
}